package com.briup.cms.dao;
import com.briup.cms.bean.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {

    @Select("select * from user")
    List<User>selectAll();


    @Insert("insert into user values(null,#{username},#{password},#{telephone},#{gender},#{realName},#{photo},#{status},#{role_id})")
    void insert(User user);


    @Update("update user set username=#{username},password=#{password},telephone=#{telephone},gender=#{gender},realName=#{realName},photo=#{photo},status=#{status},role_id=#{role_id} where id=#{id}")
    void update(User user);


    @Delete("delete from user where id=#{id}")
    void deleteById(Long id);
}
